import { useContext } from 'react';
import PostItemContext from './context';

export const useContextData = () => {
  return useContext(PostItemContext);;
}

export const useDetails = () => {
  const ctx = useContextData();
  return ctx.details;
}

export const useDetail = () => {
  const ctx = useContextData();
  return !!ctx.isDetail;
}